package com.dex4d.ui.qr.fragment;


import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.dex4d.R;

import butterknife.BindView;
import butterknife.ButterKnife;


public class EasyErrorCodeFragment extends Fragment {

    private static final String ARG_PARAM1 = "param1";

    private String mParam1;


    @BindView(R.id.txt_error_code)
    TextView txt_error_code;

    public EasyErrorCodeFragment() {
        // Required empty public constructor
    }


    public static EasyErrorCodeFragment newInstance(String param1) {
        EasyErrorCodeFragment fragment = new EasyErrorCodeFragment();
        Bundle args = new Bundle();
        args.putString(ARG_PARAM1, param1);
        fragment.setArguments(args);
        return fragment;
    }

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        if (getArguments() != null) {
            mParam1 = getArguments().getString(ARG_PARAM1);
        }
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        View view=inflater.inflate(R.layout.fragment_easy_error_code, container, false);
        ButterKnife.bind(this,view);
        return view;
    }

    @Override
    public void onActivityCreated(@Nullable Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
        txt_error_code.setText(mParam1);
    }
}
